package org.agile4j.patterns.callback;

public class B {
	public void execute(CallBack action) { // 【背景3】
		getConnection();
		action.doCRUD(); // 【i call you back】
		releaseConnection();
	}

	public void getConnection() {
		System.out.println("获得连接...");
	}

	public void releaseConnection() {
		System.out.println("释放连接...");
	}
}